<?php namespace App\Admin\Access\OperationLog;

use App\Core\Model as BaseModel;

class Model extends BaseModel {

    protected $table = 'sys_operation_log';
    protected $primaryKey = 'id';
	
    public function parentNode(){
		return $this->belongsTo('App\Admin\Content\Category\Model', 'parent_id', 'category_id');
	}
    
	public function operation(){
		return $this->belongsTo('App\Models\User', 'created_by', 'user_id');
	}
	
	public function user(){
        return $this->belongsTo('App\Admin\Accsss\User\Model', 'user_id','user_id');
    }
}